@@ -1,5 +1,8 @@
Revision history for Perl extension Starman
+0.2011 Tue May 24 09:41:52 PDT 2011
+ - Fix chunked response with 0-length PSGI array elements (chmrr)
+
0.2010 Mon Mar 28 16:23:23 PDT 2011
- Fixed packaging. No changes.
@@ -23,6 +23,7 @@ META.yml
README
t/00_compile.t
t/chunked_req.t
+t/chunked_zero_length.t
t/findbin.psgi
t/findbin.t
t/rand.psgi
@@ -9,7 +9,7 @@ build_requires:
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 1.00'
+generated_by: 'Module::Install version 1.01'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -36,4 +36,4 @@ requires:
resources:
license: http://dev.perl.org/licenses/
repository: git://github.com/miyagawa/Starman.git
-version: 0.2010
+version: 0.2011
@@ -38,6 +38,8 @@ starman - Starman launcher
starman --listen :5001 --listen /tmp/starman.sock
starman --workers 32 --port 8080
+=head1 OPTIONS
+
=over 4
=item -l, --listen
@@ -176,7 +178,13 @@ common backend that L<plackup> uses, so the most options explained in
C<plackup -h> such as C<--access-log> or C<--daemonize> works fine in
starman too.
-C<starman> command automatically sets the environment (C<-E>) to the value of I<deployment>.
+C<starman> command automatically sets the environment (C<-E>) to the
+value of I<deployment>.
+
+Setting the environment variable C<STARMAN_DEBUG> to 1 makes the
+Starman server runninng in the debug mode.
+
+=cut
=head1 SEE ALSO
@@ -4,7 +4,7 @@ package Module::Install::Base;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
}
# Suspend handler for "redefined" warnings
@@ -9,7 +9,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -515,6 +515,7 @@ sub __extract_license {
'GNU Free Documentation license' => 'unrestricted', 1,
'GNU Affero General Public License' => 'open_source', 1,
'(?:Free)?BSD license' => 'bsd', 1,
+ 'Artistic license 2\.0' => 'artistic_2', 1,
'Artistic license' => 'artistic', 1,
'Apache (?:Software )?license' => 'apache', 1,
'GPL' => 'gpl', 1,
@@ -550,9 +551,9 @@ sub license_from {
sub _extract_bugtracker {
my @links = $_[0] =~ m#L<(
- \Qhttp://rt.cpan.org/\E[^>]+|
- \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
- \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+ https?\Q://rt.cpan.org/\E[^>]+|
+ https?\Q://github.com/\E[\w_]+/[\w_]+/issues|
+ https?\Q://code.google.com/p/\E[\w_\-]+/issues/list
)>#gx;
my %links;
@links{@links}=();
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
@@ -31,7 +31,7 @@ BEGIN {
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '1.00';
+ $VERSION = '1.01';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -467,4 +467,4 @@ sub _CLASS ($) {
1;
-# Copyright 2008 - 2010 Adam Kennedy.
+# Copyright 2008 - 2011 Adam Kennedy.
@@ -454,6 +454,7 @@ sub _finalize_response {
my $buffer = $_[0];
if ($chunked) {
my $len = length $buffer;
+ return unless $len;
$buffer = sprintf( "%x", $len ) . $CRLF . $buffer . $CRLF;
}
syswrite $conn, $buffer;
@@ -467,6 +468,7 @@ sub _finalize_response {
my $buffer = $_[0];
if ($chunked) {
my $len = length $buffer;
+ return unless $len;
$buffer = sprintf( "%x", $len ) . $CRLF . $buffer . $CRLF;
}
syswrite $conn, $buffer;
@@ -2,7 +2,7 @@ package Starman;
use strict;
use 5.008_001;
-our $VERSION = '0.2010';
+our $VERSION = '0.2011';
1;
__END__
@@ -0,0 +1,30 @@
+use strict;
+use Plack::Test;
+use HTTP::Request;
+use Test::More;
+
+$Plack::Test::Impl = "Server";
+$ENV{PLACK_SERVER} = 'Starman';
+
+my $app = sub {
+ my $env = shift;
+ return sub {
+ my $response = shift;
+ my $writer = $response->([ 200, [ 'Content-Type', 'text/plain' ]]);
+ $writer->write("Content");
+ $writer->write("");
+ $writer->write("Again");
+ $writer->close;
+ }
+};
+
+test_psgi $app, sub {
+ my $cb = shift;
+
+ my $req = HTTP::Request->new(GET => "http://localhost/");
+ my $res = $cb->($req);
+
+ is $res->content, "ContentAgain";
+};
+
+done_testing;